﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;

namespace GroupChat2013.Entity
{
    /// <summary>
    /// 好友信息实体
    /// </summary>
    public class FriendInfo
    {
        public FriendInfo()
        {
            userInfoId = username = loginName = nickname = string.Empty;
        }

        public string userInfoId { get; set; }

        public bool online { get; set; }

        public string username { get; set; }

        public string loginName { get; set; }

        public string nickname { get; set; }

        public string portrait { get; set; }

        public override bool Equals(object obj)
        {
            FriendInfo gu = obj as FriendInfo;
            return this.userInfoId == gu.userInfoId && this.online == gu.online
                && this.loginName == gu.loginName && this.portrait == gu.portrait;
        }

        public override int GetHashCode()
        {
            return userInfoId.GetHashCode() ^ online.GetHashCode() ^
                        loginName.GetHashCode() ^ portrait.GetHashCode();
        }
    }
}

